<template>
  <div class="home">
    <div class="box">
      <top @tj="tj"></top>
      <List :List="List"></List>
    </div>
  </div>
</template>

<script>
import Top from "@/components/Top.vue";
import List from "@/components/List.vue";

export default {
  name: "HomeView",
  data() {
    return {
      mc: "",
      jg: "",
      List: []
    };
  },
  methods: {
    // 添加
    tj(obj) {
      let { mc, jg } = obj;
      this.mc = mc;
      this.jg = jg;
      this.List.push({
        mc: this.mc,
        jg: this.jg
      });
      
    },
  },
  components: {
    Top,
    List
  }
};
</script>
<style lang="scss" scoped>
</style>

